package com.uha.reggie.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.uha.reggie.common.ReggieResult;
import com.uha.reggie.entity.Orders;
import com.uha.reggie.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author uha
 * @date 2023/6/16
 * @apiNote
 */
@RestController
@RequestMapping("/order")
public class OrdersController {

    @Autowired
    private OrdersService ordersService;

    @PostMapping("/submit")
    public ReggieResult<String> sumbit(@RequestBody Orders orders){

        ordersService.submit(orders);

        return ReggieResult.success("下单成功~");
    }

    @GetMapping("/userPage")
    public ReggieResult<String> userpage(){



        return ReggieResult.success("~~~");
    }






}
